<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 200px;
            height: 200px;
            background-color: pink;
            position: absolute;
            top: 0;
            left: 0;
        }
        /*
        谁的数值大谁就能展示出来，默认是0
        只有绝对 相对和固定定位可使用此属性
         */
        div:first-child {
            z-index: 1;
        }

        div:nth-child(2) {
            background-color: purple;
            top:30px;
            left: 30px;
        }

        div:last-child {
            background-color: skyblue;
            top: 60px;left: 60px;
        }
    </style>
</head>

<body>
    <div></div>
    <div></div>
    <div></div>
</body>

</html>